home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / g_man / cat3 / OpenGL / gluunproject.z / gluunproject
Encoding:
Text File  |  2001-04-17  |  4.2 KB  |  129 lines

  1.  
  2.  
  3.  
  4. gggglllluuuuUUUUnnnnPPPPrrrroooojjjjeeeecccctttt((((3333GGGG))))               OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee               gggglllluuuuUUUUnnnnPPPPrrrroooojjjjeeeecccctttt((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      gggglllluuuuUUUUnnnnPPPPrrrroooojjjjeeeecccctttt - map window coordinates to object coordinates
  10.  
  11.  
  12. CCCC SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  13.      GLint gggglllluuuuUUUUnnnnPPPPrrrroooojjjjeeeecccctttt( GLdouble _w_i_n_X,
  14.                          GLdouble _w_i_n_Y,
  15.                          GLdouble _w_i_n_Z,
  16.                          const GLdouble *_m_o_d_e_l,
  17.                          const GLdouble *_p_r_o_j,
  18.                          const GLint *_v_i_e_w,
  19.                          GLdouble* _o_b_j_X,
  20.                          GLdouble* _o_b_j_Y,
  21.                          GLdouble* _o_b_j_Z )
  22.  
  23.  
  24. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  25.      _w_i_n_X, _w_i_n_Y, _w_i_n_Z
  26.                      Specify the window coordinates to be mapped.
  27.  
  28.      _m_o_d_e_l           Specifies the modelview matrix (as from a ggggllllGGGGeeeettttDDDDoooouuuubbbblllleeeevvvv
  29.                      call).
  30.  
  31.      _p_r_o_j            Specifies the projection matrix (as from a ggggllllGGGGeeeettttDDDDoooouuuubbbblllleeeevvvv
  32.                      call).
  33.  
  34.      _v_i_e_w            Specifies the viewport (as from a ggggllllGGGGeeeettttIIIInnnntttteeeeggggeeeerrrrvvvv call).
  35.  
  36.      _o_b_j_X, _o_b_j_Y, _o_b_j_Z
  37.                      Returns the computed object coordinates.
  38.  
  39. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  40.      gggglllluuuuUUUUnnnnPPPPrrrroooojjjjeeeecccctttt maps the specified window coordinates into object
  41.      coordinates using _m_o_d_e_l, _p_r_o_j, and _v_i_e_w.  The result is stored in _o_b_j_X,
  42.      _o_b_j_Y, and _o_b_j_Z. A return value of GGGGLLLL____TTTTRRRRUUUUEEEE indicates success; a return
  43.      value of GGGGLLLL____FFFFAAAALLLLSSSSEEEE indicates failure.
  44.  
  45.      To compute the coordinates (_o_b_j_X, _o_b_j_Y, and _o_b_j_Z), gggglllluuuuUUUUnnnnPPPPrrrroooojjjjeeeecccctttt
  46.      multiplies the normalized device coordinates by the inverse of _m_o_d_e_l*_p_r_o_j
  47.      as follows:
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.                    (||||(  WobjZobjYobjX  )||||) = INV(PM)(||||||||(          12(winZ) - 1view[3]2(winY - view[1])_________________ - 1view[2]2(winX - view[0])_________________ - 1  )||||||||)
  55.  
  56.  
  57.  
  58.                                                                         PPPPaaaaggggeeee 1111
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65. gggglllluuuuUUUUnnnnPPPPrrrroooojjjjeeeecccctttt((((3333GGGG))))               OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee               gggglllluuuuUUUUnnnnPPPPrrrroooojjjjeeeecccctttt((((3333GGGG))))
  66.  
  67.  
  68.  
  69.      INV() denotes matrix inversion. W is an unused variable, included for
  70.      consistent matrix notation.
  71.  
  72. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  73.      ggggllllGGGGeeeetttt, gggglllluuuuPPPPrrrroooojjjjeeeecccctttt
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.                                                                         PPPPaaaaggggeeee 2222
  125.  
  126.  
  127.  
  128.